package com.csxh.web.service.eshop;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.csxh.web.dao.IDao;
import com.csxh.web.dao.eshop.PaymethodDao;
import com.csxh.web.mapper.eshop.PaymethodMapper;
import com.csxh.web.model.eshop.Paymethod;
import com.csxh.web.service.PagerService;

@Service
public class PaymethodService extends PagerService<Paymethod> {

	private PaymethodDao thisDao;
	
	@Autowired
	public void setDao(IDao<Paymethod> dao) {
		this.thisDao=(PaymethodDao)dao;
		super.setDao(dao);
	}

	public List<Paymethod> findAll() {
		SqlSession session = this.thisDao.getSessionFactory().openSession();

		PaymethodMapper mapper = session.getMapper(PaymethodMapper.class);
		 List<Paymethod> list= mapper.selectAll();
		
		return list;
	}

}
